{{#extends @html/widgets/node_widget.html}}
{{:widget_div_name}}login{{/:widget_div_name}}

{{:widget_title}}
	{{?!widget.ctx.mm.aa.acl_data.user.user_id}}
		Авторизация
	{{?:}}
		<a href="{{/}}members/{{widget.content.user.oid}}">{{widget.content.user.fullname | truncate 19 from="begin"}}</a>,
	{{/?}}
{{/:widget_title}}

{{:widget_body}}
	{{!connect 'screen/widgets/wg-login.css'}}
{{?!widget.ctx.mm.aa.acl_data.user.user_id}}
	<form action="{{/}}{{?community.url}}{{community.url}}/{{/?}}login" method="post" onsubmit="this.login.readonly=true;" class="auth-">
		<p class="desc-">Чтобы авторизоваться введите</p>
		<div class="block-">
			<label class="label-">Имя пользователя</label>
			<input type="text"  name="openid_login" value="" id="openid_login" class="field-" />
		</div>
		<div class="block-">
			<label class="label-">…и пароль</label>
			<input type="password"  name="openid_password" value="" id="openid_password" class="field-" />
		</div>
		<div class="block- block-clear-">
			<label class="label-">…или OpenID</label>
			<input type="hidden" name="openid_action" value="login" />
			<input type="text"  name="openid_url" value="" id="login" class="field-" />
		</div>
		<div class="block-">
			<input type="image" src="{{!static type='images' 'title/button.gif'}}" alt="Войти" name="login" class="button-" />
		</div>
		<p class="desc- block-clear-"><a href="{{/}}registration">Зарегистрироваться</a> или <a href="{{widget.pw_recovery_url}}">восстановить пароль</a></p>
	</form>
{{?:}}
	<div class="logged-">
		<div class="greetings-">идущие на смерть, приветствуют тебя!</div>
		<div class="avatar-"><a href="{{/}}members/{{widget.content.user.oid}}"><img src="{{?widget.content.user.avatar}}{{/}}{{widget.content.user.avatar | link_to 'imagestorage' 'sm1'}}{{?:}}{{images}}avatar-48x48.png{{/?}}" alt="" class="img-" /></a></div>
		<ul class="menu-">
			<li class="item-"><a href="{{/}}members/{{widget.content.user.oid}}">мои записи</a>,</li>
			<li class="item-"><a href="{{/}}members/{{widget.content.user.oid}}/edit">настройки</a></li>
			<li class="item-"><a href="{{/}}logout" class="exit-">выйти</a></li>
		</ul>
	</div>
{{/?}}
{{/:widget_body}}
